
Research
wget to Wipeout: Malicious Go Modules Fetch Destructive Payload
Socket's research uncovers three dangerous Go modules that contain obfuscated disk-wiping malware, threatening complete data loss.
@ariesclark/array
Advanced tools
Fast, efficient, and easy-to-use array extensions for TypeScript.
Fast, efficient, and easy-to-use array extensions for TypeScript.
npm install @ariesclark/extensions
# Or directly, if you only need the array extension.
npm install @ariesclark/array
group
(function)Groups the items in the array by the given function.
group([1, 2, 3, 4, 5], item => (item % 2 === 0 ? 'even' : 'odd'));
// {
// odd: [1, 3, 5],
// even: [2, 4]
// }
randomIndex
(function)Get a random index from an array.
Parameters:
{ length: 0; }
)RandomFunction
)returns: null
const value = ['lorem', 'ipsum', 'dolor', 'sit', 'amet'];
randomIndex(value); // 3, eventually.
randomIndex(value); // 0, eventually.
randomIndex(value); // 2, eventually.
randomIndex
(function)Parameters:
{ length: number; }
)RandomFunction
)returns: null
randomIndex
(function)Parameters:
{ length: number; }
)RandomFunction
)returns: null
randomItem
(function)Get a random item from an array, with an optional random number generator.
Parameters:
{ length: 0; }
)RandomFunction
)returns: null
const value = ['lorem', 'ipsum', 'dolor', 'sit', 'amet'];
randomItem(value); // "amet", eventually.
randomItem(value); // "dolor", eventually.
randomItem(value); // "lorem", eventually.
randomItem
(function)Parameters:
{ [index: number]: T; length: number; }
)RandomFunction
)returns: null
randomItem
(function)Parameters:
{ [index: number]: T; length: number; }
)RandomFunction
)returns: null
unique
(function)Returns a new array with unique values based on the by
function.
Parameters:
T[]
)(value: T) => unknown
)returns: T[]
{ from, fromAsync, isArray, of }
(variable)FAQs
Fast, efficient, and easy-to-use array extensions for TypeScript.
We found that @ariesclark/array demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Socket's research uncovers three dangerous Go modules that contain obfuscated disk-wiping malware, threatening complete data loss.
Research
Socket uncovers malicious packages on PyPI using Gmail's SMTP protocol for command and control (C2) to exfiltrate data and execute commands.
Product
We redesigned Socket's first logged-in page to display rich and insightful visualizations about your repositories protected against supply chain threats.